﻿using System;

namespace Api1.Util
{
    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
    class JsInterface
    {
        zwForm form;
        public JsInterface(zwForm form)
        {
            this.form = form;
        }
        public string ClearCard()
        {
            return form.ClearCard();
        }
        /// <summary>
        /// 清柜号
        /// </summary>
        /// <param name="flag"></param>
        /// <returns></returns>
        public string ClearCupNo(String flag) {
            return form.ClearCupNo(flag);
        }
        public string Reconncet()
        {
            return form.Reconncet();
        }

        public string MakeCard()
        {
            return form.MakeCard();
        }
         
        public bool IsAutoRead(){ 
           return  form.IsAutoRead();
        }
        public string RestCard()
        {
            return form.RestCard();
        }
        public void JsStartAutoRead() {
            form.JsStopAutoRead();
        }
        public void JsStopAutoRead() {
            form.JsStartAutoRead();
        }

        public string MakeNoCupCard()
        {
            return form.MakeNoCupCard();
        }
        /// <summary>
        /// 制匹配卡
        /// </summary>
        /// <param name="cardno"></param>
        /// <returns></returns>
        public string QueryCard(string cardno)
        {
            return form.QueryCard(cardno);
        }

        public string StateCard()
        {
            return form.StateCard();
        }
        public string GetError(string err)
        {
            return form.GetError(err);
        }
        
        public string WriteAuth(string auth)
        {
            return form.WriteAuth(auth);
        }

        public string ReadAuth()
        {
            return form.ReadAuth();
        }

        public string ReadCupNo()
        {
            return form.ReadCupNo();
        }

        public string StaffCardSet(string value)
        {
            return form.StaffCardSet(value);
        }
        public string ReadNoNumber()
        {
            return form.ReadNoNumber();
        }
        public string EditNoCard(string num, string gender)
        {
            return form.EditNoCard(num, gender);
        }
        /// <summary>
        /// 打开摄像头
        /// </summary>
        public void OpenCamare()
        {
            form.OpenCamare();
        }
        //获取人脸模板图片url 地址
        public String GetFaceCode() {
            return form.GetFaceCode();
        }
        //获取人脸模板
        public String GetFaceUrl() {
            return form.GetFaceUrl();

        }
        // 获取指纹1
        public void SignFinger1()
        {
            form.SignFinger1();
        }
        // 获取指纹2
        public void SignFinger2()
        {
            form.SignFinger2();
        }
        /// <summary>
        /// 从安科获取会员信息
        /// </summary>
        public String GetMemberInfo(String card_no) {
           return  form.GetMemberInfo(card_no);
        }
        /// <summary>
        /// 下载excel
        /// </summary>
        public void Down_Excel(String url) {
            form.Down_Excel(url);
        }
        public string IsRent()
        {
            return form.IsRent();
        }

        public String ReadSmartCupNo() {
            return form.ReadSmartCupNo();
        }
        public String SetWaterPump(int type, int count, int munute) {
            return form.SetWaterPump(type, count, munute);
        }
        ////////////////////////////////////////////////////////////////////
    }
}
